Optimal. Leaf size=51 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{\sqrt {a+b}}-\frac {\coth (x) \sqrt {a+b \tanh ^2(x)}}{a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {3751, 491, 12,
385, 212} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{\sqrt {a+b}}-\frac {\coth (x) \sqrt {a+b \tanh ^2(x)}}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 212
Rule 385
Rule 491
Rule 3751
Rubi steps
\begin {align*} \int \frac {\coth ^2(x)}{\sqrt {a+b \tanh ^2(x)}} \, dx &=\text {Subst}\left (\int \frac {1}{x^2 \left (1-x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tanh (x)\right )\\ &=-\frac {\coth (x) \sqrt {a+b \tanh ^2(x)}}{a}+\frac {\text {Subst}\left (\int \frac {a}{\left (1-x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tanh (x)\right )}{a}\\ &=-\frac {\coth (x) \sqrt {a+b \tanh ^2(x)}}{a}+\text {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \sqrt {a+b x^2}} \, dx,x,\tanh (x)\right )\\ &=-\frac {\coth (x) \sqrt {a+b \tanh ^2(x)}}{a}+\text {Subst}\left (\int \frac {1}{1-(a+b) x^2} \, dx,x,\frac {\tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a+b} \tanh (x)}{\sqrt {a+b \tanh ^2(x)}}\right )}{\sqrt {a+b}}-\frac {\coth (x) \sqrt {a+b \tanh ^2(x)}}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 3.97, size = 123, normalized size = 2.41 \begin {gather*} \frac {\left (\frac {(a+b)^2 (a-b+(a+b) \cosh (2 x))^2 \, _2F_1\left (2,2;\frac {5}{2};-\frac {(a+b) \sinh ^2(x)}{a}\right )}{a^3}+3 \text {ArcSin}\left (\sqrt {-\frac {(a+b) \sinh ^2(x)}{a}}\right ) \left (2 b+a \coth ^2(x)\right ) \text {csch}^2(x) \sqrt {-\frac {(a+b) \left (b+a \coth ^2(x)\right ) \sinh ^4(x)}{a^2}}\right ) \tanh (x)}{3 (a+b) \sqrt {a+b \tanh ^2(x)}} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 1.72, size = 0, normalized size = 0.00 \[\int \frac {\coth ^{2}\left (x \right )}{\sqrt {a +b \left (\tanh ^{2}\left (x \right )\right )}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 468 vs.
\(2 (43) = 86\).
time = 0.42, size = 1565, normalized size = 30.69 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\coth ^{2}{\left (x \right )}}{\sqrt {a + b \tanh ^{2}{\left (x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 343 vs.
\(2 (43) = 86\).
time = 0.59, size = 343, normalized size = 6.73 \begin {gather*} -\frac {\log \left ({\left | -{\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )} {\left (a + b\right )} - \sqrt {a + b} {\left (a - b\right )} \right |}\right )}{2 \, \sqrt {a + b}} - \frac {\log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} + \sqrt {a + b} \right |}\right )}{2 \, \sqrt {a + b}} + \frac {\log \left ({\left | -\sqrt {a + b} e^{\left (2 \, x\right )} + \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} - \sqrt {a + b} \right |}\right )}{2 \, \sqrt {a + b}} + \frac {4 \, {\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b} + \sqrt {a + b}\right )}}{{\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )}^{2} - 2 \, {\left (\sqrt {a + b} e^{\left (2 \, x\right )} - \sqrt {a e^{\left (4 \, x\right )} + b e^{\left (4 \, x\right )} + 2 \, a e^{\left (2 \, x\right )} - 2 \, b e^{\left (2 \, x\right )} + a + b}\right )} \sqrt {a + b} - 3 \, a + b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {{\mathrm {coth}\left (x\right )}^2}{\sqrt {b\,{\mathrm {tanh}\left (x\right )}^2+a}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________